﻿
using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
	
	/// <summary>	 
	/// 服务器IP
	/// </summary>
	public class ServerIP
	{ 
		#region ServerIP
		/// <summary>
		/// 
		/// </summary>
		public ServerIP()
		{
		}
		/// <summary>	 
		/// 
		/// </summary>
		public ServerIP(Int32 iD)
		{
			this.iD = iD;
		
		}
		/// <summary>	 
		/// 
		/// </summary>		
		public ServerIP(DataRow dr)
		{
			int.TryParse(Convert.ToString(dr["iD"]),out iD);
			this.iP = Convert.ToString(dr["iP"]);
			if(dr["lastTime"] != DBNull.Value)
				this.lastTime = Convert.ToDateTime(dr["lastTime"]);
			int.TryParse(Convert.ToString(dr["stateR"]),out stateR);
			
		}
		#endregion
		
		
		#region ID
		private Int32 iD;
		/// <summary>	 
		/// ID
		/// AutoInc
		/// PK
		/// </summary>
		public Int32 ID
		{
			get{ return iD; }
			set{ iD= value; }
		}
		#endregion
		
		#region IP
		private System.String iP;
		/// <summary>	 
		/// IP
		/// </summary>
		public System.String IP
		{
			get{ return iP; }
			set{ iP= value; }
		}
		#endregion
		
		#region LastTime
		private DateTime lastTime;
		/// <summary>	 
		/// 最后访问时间
		/// </summary>
		public DateTime LastTime
		{
			get{ return lastTime; }
			set{ lastTime= value; }
		}
		#endregion
		
		#region StateR
		private Int32 stateR;
		/// <summary>	 
		/// 状态
		/// </summary>
		public Int32 StateR
		{
			get{ return stateR; }
			set{ stateR= value; }
		}
		#endregion

	}
}
